package com.xq.staticmethod;

public class VerifyCodeUtil {

    // 工具类没有创建对象的必要性，所以建议私有化构造器
    private VerifyCodeUtil() {
    }

    public static String getCode(int num) {
        String code = "";
        for (int i = 0; i < num; i++) {
            int number = (int)(Math.random() * 10);
            code += number;
        }
        return code;
    }
}
